package pojo;

import java.sql.Timestamp;
import java.util.Objects;

public class TbOrder {
    private Integer orderId;
    private String orderNum;
    private Double orderPrice;
    private Integer orderStatus;
    private Timestamp orderTime;
    private Integer orderLockStatus;
    private String orderZfbName;
    private String orderZfbNum;
    private Integer userId;
    private Integer addressId;
    private TbUser tbUserByUserId;
    private TbAddress tbAddressByAddressId;

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Double getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(Double orderPrice) {
        this.orderPrice = orderPrice;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Timestamp getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Timestamp orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getOrderLockStatus() {
        return orderLockStatus;
    }

    public void setOrderLockStatus(Integer orderLockStatus) {
        this.orderLockStatus = orderLockStatus;
    }

    public String getOrderZfbName() {
        return orderZfbName;
    }

    public void setOrderZfbName(String orderZfbName) {
        this.orderZfbName = orderZfbName;
    }

    public String getOrderZfbNum() {
        return orderZfbNum;
    }

    public void setOrderZfbNum(String orderZfbNum) {
        this.orderZfbNum = orderZfbNum;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbOrder tbOrder = (TbOrder) o;
        return Objects.equals(orderId, tbOrder.orderId) &&
                Objects.equals(orderNum, tbOrder.orderNum) &&
                Objects.equals(orderPrice, tbOrder.orderPrice) &&
                Objects.equals(orderStatus, tbOrder.orderStatus) &&
                Objects.equals(orderTime, tbOrder.orderTime) &&
                Objects.equals(orderLockStatus, tbOrder.orderLockStatus) &&
                Objects.equals(orderZfbName, tbOrder.orderZfbName) &&
                Objects.equals(orderZfbNum, tbOrder.orderZfbNum) &&
                Objects.equals(userId, tbOrder.userId) &&
                Objects.equals(addressId, tbOrder.addressId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(orderId, orderNum, orderPrice, orderStatus, orderTime, orderLockStatus, orderZfbName, orderZfbNum, userId, addressId);
    }

    public TbUser getTbUserByUserId() {
        return tbUserByUserId;
    }

    public void setTbUserByUserId(TbUser tbUserByUserId) {
        this.tbUserByUserId = tbUserByUserId;
    }

    public TbAddress getTbAddressByAddressId() {
        return tbAddressByAddressId;
    }

    public void setTbAddressByAddressId(TbAddress tbAddressByAddressId) {
        this.tbAddressByAddressId = tbAddressByAddressId;
    }
}
